import { observable } from 'mobx';
import service from '../service/index';


const ChapterListStore = observable({
    title: 'this is login page',
    lastEntryChapterID:'',

    currentCourseItem: null,

    chapterList: [],
    // 获取教材
    async GetClassListById(directoryId) {
        directoryId = directoryId || "D92C7917-1A31-48B0-BCF5-A4A70148DB2B";
        this.chapterList = await service.GetClassListById(directoryId);

        // this.gradeList.forEach(x => x.ImageURL = ' http://www.besteasylearn.com/pic/book.png')

        console.log(this.gradeList, "==========this.gradeList========");
    },

    async GetCurrentDirectoryEntity(directoryId) {
        directoryId = directoryId || "D92C7917-1A31-48B0-BCF5-A4A70148DB2B";
        this.currentCourseItem = await service.GetCurrentDirectoryEntity(directoryId);
        console.log(this.gradeList, "==========this.gradeList========");
    }



});


export default ChapterListStore;